A mesh network has advantages of a wide coverage area, low deployment costs, easy access, and the like, and therefore has an extremely broad application prospect. For example, a mesh network technology is commonly used in the Internet of Things.
Each mesh node that is to select a route in the mesh network selects a route based on signal strength of a mesh node that can provide a route. For example, a client generally accesses an access point (AP) with a relatively strong signal. However, each mesh node in the mesh network selects a route based on signal strength, which may cause an energy use imbalance in the mesh network, and reduce an available time of the mesh network. For example, currently there are four clients and two APs. The four clients are respectively c1, c2, c3, and c4, and the two APs are respectively AP 1 and AP 2. For the c1 and the c2, signal strength of the AP 1 is greater than that of the AP 2, and for the c3 and the c4, signal strength of the AP 1 is approximately the same as that of the AP 2, but the signal strength of the AP 1 is slightly greater than that of the AP 2. Therefore, if a solution of selecting a route based on signal strength is used, the c1, the c2, the c3, and the c4 access the AP 1, load of the AP 1 is significantly greater than that of the AP 2, and energy consumption of the AP 1 is accelerated, while the AP 2 consumes no energy. This causes an energy consumption imbalance. When the AP 1 runs out of energy, the c1 and the c2 need to access the AP 2 that is at a farther distance, which consumes more energy than accessing the AP 1. Therefore, overall power consumption of the mesh network is increased, and the available time of the mesh network is reduced.